//public是对axios的工具类封装，定义了http请求方法
// axios实现了http方法的封装，vue.js官方不再继续维护vue-resource,推荐使用 axios。
import http from './../../../base/api/public'
import querystring from 'querystring'

let sysConfig = require('@/../config/sysConfig');
let apiUrl = sysConfig.xcApiUrlPre;
export const page_list = (page,size,params) => {
  //将json对象转成key/value对
  let query = querystring.stringify(params);
  return http.requestQuickGet(apiUrl+'/cms/page/list/+'+page+"/"+size+"/?"+query);
}
export const page_add = params => {
  return http.requestPost(apiUrl+'/cms/page/add',params);
}
export const page_get = id => {
  return http.requestGet(apiUrl+'/cms/page/get/'+id);
}
export const page_edit = (id,params) => {
  return http.requestPut(apiUrl+'/cms/page/edit/'+id,params);
}

export const  page_del = (id) => {
  return http.requestDelete(apiUrl+"/cms/page/del/"+id);
}
